package cn.itcast.nio.c4;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author Dee
 * @date 2023/11/11
 * <p>Description:
 */
public class DeeMultiThreadClient {
    public static void main(String[] args) throws IOException {
        SocketChannel channel = SocketChannel.open();
        channel.connect(new InetSocketAddress("127.0.0.1", 8080));
        channel.write(Charset.defaultCharset().encode("hello"));
        System.in.read();
    }
}
